package com.ruoyi.channel.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.channel.mapper.TbWorkMessageMapper;
import com.ruoyi.channel.domain.TbWorkMessage;
import com.ruoyi.channel.service.ITbWorkMessageService;

/**
 * 招聘信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-01-29
 */
@Service
public class TbWorkMessageServiceImpl implements ITbWorkMessageService 
{
    @Autowired
    private TbWorkMessageMapper tbWorkMessageMapper;

    /**
     * 查询招聘信息
     * 
     * @param workId 招聘信息主键
     * @return 招聘信息
     */
    @Override
    public TbWorkMessage selectTbWorkMessageByWorkId(Long workId)
    {
        return tbWorkMessageMapper.selectTbWorkMessageByWorkId(workId);
    }

    /**
     * 查询招聘信息列表
     * 
     * @param tbWorkMessage 招聘信息
     * @return 招聘信息
     */
    @Override
    public List<TbWorkMessage> selectTbWorkMessageList(TbWorkMessage tbWorkMessage)
    {
        return tbWorkMessageMapper.selectTbWorkMessageList(tbWorkMessage);
    }

    /**
     * 新增招聘信息
     * 
     * @param tbWorkMessage 招聘信息
     * @return 结果
     */
    @Override
    public int insertTbWorkMessage(TbWorkMessage tbWorkMessage)
    {
        tbWorkMessage.setCreateTime(DateUtils.getNowDate());
        return tbWorkMessageMapper.insertTbWorkMessage(tbWorkMessage);
    }

    /**
     * 修改招聘信息
     * 
     * @param tbWorkMessage 招聘信息
     * @return 结果
     */
    @Override
    public int updateTbWorkMessage(TbWorkMessage tbWorkMessage)
    {
        tbWorkMessage.setUpdateTime(DateUtils.getNowDate());
        return tbWorkMessageMapper.updateTbWorkMessage(tbWorkMessage);
    }

    /**
     * 批量删除招聘信息
     * 
     * @param workIds 需要删除的招聘信息主键
     * @return 结果
     */
    @Override
    public int deleteTbWorkMessageByWorkIds(Long[] workIds)
    {
        return tbWorkMessageMapper.deleteTbWorkMessageByWorkIds(workIds);
    }

    /**
     * 删除招聘信息信息
     * 
     * @param workId 招聘信息主键
     * @return 结果
     */
    @Override
    public int deleteTbWorkMessageByWorkId(Long workId)
    {
        return tbWorkMessageMapper.deleteTbWorkMessageByWorkId(workId);
    }
}
